<?php

//use Phalcon\Mvc\Application;
ini_set('date.timezone', 'Asia/Shanghai');


if (realpath("..")) {
    define('APP_PATH', realpath(".."));
} else {
    define('APP_PATH', dirname(dirname(__FILE__)));
}




if (isset($_SERVER['APPLICATION_ENV'])) {
    $applicationEnv = ($_SERVER['APPLICATION_ENV'] ? $_SERVER['APPLICATION_ENV'] : 'production');
} else {
    $applicationEnv = (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');
}

#test
$applicationEnv = 'development';

if ($applicationEnv === 'development') {
    ini_set("display_errors", "on");
    error_reporting(E_ALL);
    $debug = new \Phalcon\Debug();
    $debug->listen();
}

define('APP_ENV', $applicationEnv);

require(APP_PATH . '/apps/Bootstrap.php');
//$_GET['_url'] = '/admin';
//require(APP_PATH . '/apps/library/MssqlPdo.class.php');
//require(APP_PATH . '/apps/library/Medoo.php');
$app = new Bootstrap();
echo $app->run([]);

